#include <stdio.h>


//被置1的位的个数
int count(int a)
{
    int count = 0;
    while(a != 0)
    {
        if(a & 1 == 1)
            count++;
        a = a >> 1;
    }
    return count;
}

int main()
{
    int a;
    scanf("%d",&a);
    printf("%d\n",count(a));
}